package com.zx.entity;

import java.time.LocalDateTime;

public class UserEntity {
		private int id;
		private String name;
		private String password;
		private String sex;
		private LocalDateTime date;
		
		public int getId() {
			return id;
		}
		public void setId(int id) {
			this.id = id;
		}
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public String getPassword() {
			return password;
		}
		public void setPassword(String password) {
			this.password = password;
		}
		public String getSex() {
			return sex;
		}
		public void setSex(String sex) {
			this.sex = sex;
		}
		public LocalDateTime getDate() {
			return date;
		}
		public void setDate(LocalDateTime date) {
			this.date = date;
		}
		
		@Override
		public String toString() {
			return "UserEntity [id=" + id + ", name=" + name + ", password=" + password + ", sex=" + sex + ", date="
					+ date + "]";
		}
		@Override
		public int hashCode() {
			final int prime = 31;
			int result = 1;
			result = prime * result + ((date == null) ? 0 : date.hashCode());
			result = prime * result + id;
			result = prime * result + ((name == null) ? 0 : name.hashCode());
			result = prime * result + ((password == null) ? 0 : password.hashCode());
			result = prime * result + ((sex == null) ? 0 : sex.hashCode());
			return result;
		}
		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			UserEntity other = (UserEntity) obj;
			if (date == null) {
				if (other.date != null)
					return false;
			} else if (!date.equals(other.date))
				return false;
			if (id != other.id)
				return false;
			if (name == null) {
				if (other.name != null)
					return false;
			} else if (!name.equals(other.name))
				return false;
			if (password == null) {
				if (other.password != null)
					return false;
			} else if (!password.equals(other.password))
				return false;
			if (sex == null) {
				if (other.sex != null)
					return false;
			} else if (!sex.equals(other.sex))
				return false;
			return true;
		}
		public UserEntity() {
			super();
			// TODO Auto-generated constructor stub
		}
		public UserEntity(int id, String name, String password, String sex, LocalDateTime date) {
			super();
			this.id = id;
			this.name = name;
			this.password = password;
			this.sex = sex;
			this.date = date;
		}
		
}
